package com.springmvc.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class User extends PageDto implements Serializable {
    private static final long serialVersionUID = -1L;

    /*表结构*/
    private Integer id; //主键自增
    private String loginName; //登录名
    private String userName; //用户名
    private String password; //密码
    private String sex; // 性别
    private String address; // 地址
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date bornTime; //出生日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime; // 创建日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date modifyTime; // 修改日期
    private String img; //头像

    public User() {
    }

    public User(Integer id, String loginName, String userName, String password, String sex, String address, Date bornTime, Date createTime, Date modifyTime, String img) {
        this.id = id;
        this.loginName = loginName;
        this.userName = userName;
        this.password = password;
        this.sex = sex;
        this.address = address;
        this.bornTime = bornTime;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
        this.img = img;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBornTime() {
        return bornTime;
    }

    public void setBornTime(Date bornTime) {
        this.bornTime = bornTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }
}